﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using Willson.JsbManager.Bll;
using Willson.JsbManager.Comm;
using Willson.JsbManager.BllEntity;

namespace Willson.JsbManager.UI
{
    public partial class BaseCompanyInfoForm : Willson.JsbManager.UI.BaseForm
    {
        public BaseCompanyInfoForm()
        {
            InitializeComponent();

            BindingList<BEBaseCompanyInfo> List = BLLFactory<BLLBaseCompanyInfo>.Instance.ListAllCompanyInfo();

            this.DataGridView.DataSource = List;

            label_search_result.Text = "共查询到 " + 
                BLLFactory<BLLBaseCompanyInfo>.Instance.GetSumCompanyItem().ToString() + 
                " 条记录，其中 " +
                BLLFactory<BLLBaseCompanyInfo>.Instance.GetNotRemoveCompanyItem().ToString() + " 条有效";
        }

        private void bt_add_Click(object sender, EventArgs e)
        {
            BaseCompanyInfoAddEditForm form = new BaseCompanyInfoAddEditForm();

            form.ShowDialog();
        }
    }
}
